<template>
  <div class="outPageBox">
    <div class="outPageBox-head">
      <div class="outPageBox-head-content">
        <div class="outPageBox-head-content-integral">
          {{ integral.points.toLocaleString() || "--" }}
        </div>
        <div
          class="outPageBox-head-content-text"
          @click="isLoginPhone ? onCheck() : ''"
        >
          当前积分
        </div>
        <template v-if="isLoginPhone">
          <div class="outPageBox-head-content-text">
            当前绑定手机号:{{ integral.phone }}(点击切换绑定手机号)
          </div>
        </template>
      </div>
    </div>
  </div>
</template>
<script>
export default {
  props: {
    integral: {
      type: Object,
      default: {},
    },
    isLoginPhone: Boolean,
  },
  watch: {
    isLoginPhone: {
      deep: true,
      handler: function (val) {
        console.log(val);
      },
    },
  },
  data() {
    return {
      show: false,
    };
  },
  methods: {
    onCheck() {
      this.$emit("logoPhone");
    },
  },
};
</script>

<style lang="less" scoped>
.outPageBox {
  width: 100%;
  &-head {
    // background: linear-gradient(180deg, #1b9ffe 0%, rgba(27, 159, 254, 0) 100%);
    padding: 10px 8px 0;
    border-bottom: 1px solid #f5f6f8;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    box-sizing: border-box;
    z-index: 2;
    &-content {
      background: #ffffff;
      height: 96px;
      display: flex;
      justify-content: center;
      align-items: center;
      flex-direction: column;
      border-radius: 10px 10px 0 0;
      &-integral {
        font-weight: 600;
        font-size: 28px;
        color: #39394d;
      }
      &-text {
        font-weight: 400;
        font-size: 12px;
        color: #909399;
        margin-top: 10px;
      }
    }
  }
}
</style>
